public class Demo02 {
    public static void main(String[] args) {
        /**
         * while循环
         */
//        int count = 1;
//        while(count<=100){
//            System.out.println("我喜欢听音乐"+count);
//            count++;
//        }

//        求一个数是几位数
          int num =123;
          int count = 0;
          if(num == 0){
              System.out.println(1);
          }else {
              while (num != 0) {
                  num = num / 10;
                  count++;
              }
              System.out.println(count);
          }
            int i = 10;
    }
}
